package com.wd.cloud.applet.config;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;

@Data
public class CustomListResultConfig<T> implements Serializable {
    private static final long serialVersionUID = 2107894268572273936L;
    private Long page;
    private Long limit;
    private Long total;
    private Long pageCount;
    private List<T> list;

    public CustomListResultConfig() {
        this.list = new ArrayList(10);
    }

    public CustomListResultConfig(Long page, Long limit, Long total, Long pageCount) {
        this(page, limit, total, pageCount, new ArrayList());
    }

    public CustomListResultConfig(Long page, Long limit, Long total, Long pageCount, List<T> list) {
        this.list = new ArrayList(10);
        this.page = page;
        this.limit = limit;
        this.total = total;
        this.pageCount = pageCount;
        this.list = list;
    }
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof CustomListResultConfig)) {
            return false;
        } else {
            CustomListResultConfig<?> other = (CustomListResultConfig) o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label71:
                {
                    Object this$page = this.getPage();
                    Object other$page = other.getPage();
                    if (this$page == null) {
                        if (other$page == null) {
                            break label71;
                        }
                    } else if (this$page.equals(other$page)) {
                        break label71;
                    }

                    return false;
                }

                Object this$limit = this.getLimit();
                Object other$limit = other.getLimit();
                if (this$limit == null) {
                    if (other$limit != null) {
                        return false;
                    }
                } else if (!this$limit.equals(other$limit)) {
                    return false;
                }

                label57:
                {
                    Object this$total = this.getTotal();
                    Object other$total = other.getTotal();
                    if (this$total == null) {
                        if (other$total == null) {
                            break label57;
                        }
                    } else if (this$total.equals(other$total)) {
                        break label57;
                    }

                    return false;
                }

                Object this$pageCount = this.getPageCount();
                Object other$pageCount = other.getPageCount();
                if (this$pageCount == null) {
                    if (other$pageCount != null) {
                        return false;
                    }
                } else if (!this$pageCount.equals(other$pageCount)) {
                    return false;
                }

                Object this$items = this.getList();
                Object other$items = other.getList();
                if (this$items == null) {
                    if (other$items == null) {
                        return true;
                    }
                } else if (this$items.equals(other$items)) {
                    return true;
                }

                return false;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof CustomListResultConfig;
    }

    public String toString() {
        return "CustomListResultConfig(page=" + this.getPage() + ", limit=" + this.getLimit() + ", total=" + this.getTotal() + ", pageCount=" + this.getPageCount() + ", items=" + this.getList() + ")";
    }
}
